import request from "@/request";

export function getUserInfo() {
  return request({
    url: '/user/getUserInfo',
    method: 'get'
  })
}

export function updateUserInfo(userNikename, userEmail, userToaccount) {
  const data = {
    userNikename,
    userEmail,
    userToaccount
  }
  return request({
    url: '/user/updateUserInfo',
    method: 'post',
    data
  })
}

export function updatePassword(oldPassword, newPassword) {
  const data = {
    oldPassword,
    newPassword
  }
  return request({
    url: '/user/updateUserPassword',
    method: 'post',
    data
  })
}